<?php
/**
 * Return customer information in a json format.
 *
 */

$id = Xview::instance()->val("customerid");
try {
	$customer = new Fox\Common\Customer($id);
	$data = $customer->getData();
	$data['customerid'] = $customer->getId();
	$data['functionValue'] = $data['function'];
	echo json_encode($data);
}
catch (Fox\Object\Exception\NotExist $e)
{
	// do nothing
}